<?php
require 'top.php';
?>



<!DOCTYPE html>
<html>
	<head lang="en">
		<meta charset="utf-8" />
		<title>个人中心</title>
		<link rel="stylesheet" type="text/css" href="css2/public.css"/>
		<link rel="stylesheet" type="text/css" href="css2/mygxin.css" />
	</head>
	<body>
		<!------------------------------head------------------------------>
		
		<?php
		error_reporting(5);
error_reporting(E_ALL & ~E_NOTICE);
error_reporting(0);
header('content-type:text/html;charset=utf-8');

//身份验证
session_start();
if (!isset($_SESSION['login'])) {
	header('Refresh:3;url=login/index.php');
	echo "你还没有登陆！";
	die();
}

require 'config.php';
$email=$_SESSION['login'];
$query_email="SELECT * FROM users WHERE `uemail`='$email'";
$result_email=mysqli_query($config,$query_email);
$row_email=mysqli_fetch_array($result_email);
// echo $row_email['uemail'];
$user_email=$row_email['userid'];
// var_dump($row_email);
$gds="SELECT * FROM goods WHERE `userid`='$user_email'";
// $goods="SELECT * FROM goods ORDER BY goodsid DESC";
			$resultgoods=mysqli_query($config,$gds) or die ('SQL语句有误:'.mysql_error());
			// $row_goods=mysqli_fetch_array($resultgoods);

// $goods = "SELECT * FROM goods WHERE userid='$user_email'";
// $que_goods = mysqli_query($config,$con);
// $row_goods=mysqli_fetch_array($que_goods);



		?>
		
		
		<!------------------------------Bott------------------------------>
		<div class="Bott">
			<div class="wrapper clearfix">
				<div class="zuo fl">
					
					<div style="height: 600px;">
						<h4>个人中心</h4>
						<ul>
							<li  ><a href="manage.php">我的中心</a></li>
							<li><a href="goods_add.php">商品发布</a></li>
						</ul>

						<h4>我的交易</h4>
						<ul>
							<li><a href="cart.php?buyerid=<?php echo $user_email;?>">我的购物车</a></li>
							<li><a href="order_goods_ok.php?buyerid=<?php echo $user_email;?>">我的订单</a></li>
							
						</ul>
						<h4>账户管理</h4>
						<ul>
							<li ><a href="information.php">个人信息</a></li>
							<li class="on"><a href="xiugai_password.php">修改密码</a></li>
						</ul>
					</div>
				</div>
				<div class="you fl" style="height:70%;">
					<div class="tx clearfix" >
						<div class="fl clearfix" >
							
							<p class="fl"><span><?php echo $row_email['uname']?></span></p>
						</div>
						<div class="fr">绑定邮箱：<?php echo $row_email['uemail']?></div>
					</div>
				
					
					<div class="bott">
						<div class="clearfix" style="margin-top: -12px;margin-bottom: 100px;font-weight: bold;">
						<h3 style="float: left;">密码修改</h3><h3 style="float: right;">联系工作人员tel：12365478985</h3>
					<form style="width: 100%;height: 350px;margin-top: 30px;font-size:24px;background-color: #cae6c5;background-size: 100% 100%;border-radius: 10px;" action="xiugai_password_ok.php" method="post">
					<br/>	
						<label for="xname" style="margin-left: 28%;">邮箱账号:</label>
						<input id="xemail" type="text" required="required" placeholder="输入邮箱账号" name="xemail" style="background-color:rgba(0,0,0,0);width: 260px;">
						<!-- <span style="margin-left: -100px;">原昵称:</span> -->

						<br/><br/>
						<label for="xpsd" style="margin-left: 28%;">&nbsp;&nbsp;原密码:&nbsp;</label>
						<input id="xpsd" type="password" required="required" placeholder="输入原密码" name="xpsd" style="background-color:rgba(0,0,0,0);width: 260px;">
						
						<br/><br/>
						<label for="npsd" style="margin-left: 28%;">&nbsp;&nbsp;新密码:&nbsp;</label>
						<input id="npsd" type="password" required="required" placeholder="输入新密码" name="npsd" style="background-color:rgba(0,0,0,0);width: 260px;">
						
						<br/><br/>
						<label for="qpsd"  style="margin-left: 28%;">确认密码:</label>
						<input id="qpsd" type="password" required="required" type="password" placeholder="确认密码" name="qpsd" style="background-color:rgba(0,0,0,0);width: 260px;">
						
						<br/><br/>
						<button style="background-color:rgba(255,255,255,0.7);margin-left: 45%;border-radius: 5px;font-size: 26px;" type="submit" onclick="return check();">确认修改</button><br/>
					</form>
						
						</div>

					</div>

				</div>
			</div>
		</div>
		
		
		
		
		
		<script src="js2/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js2/public.js" type="text/javascript" charset="utf-8"></script>
		<script src="js2/user.js" type="text/javascript" charset="utf-8"></script>
		
	</body>
</html>
